package com.qf.controller;

import com.qf.dto.R;
import com.qf.pojo.SysDevice;
import com.qf.service.SysDeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * created by 赵文韬 on 2022/3/25 10:30
 */
@RestController
public class SysDeviceController {
    private SysDeviceService sysDeviceService;
    @Autowired
    public void setSysDeviceService(SysDeviceService sysDeviceService) {
        this.sysDeviceService = sysDeviceService;
    }

    @PostMapping("addDevice")
    public R add(@RequestBody SysDevice sysDevice){
        sysDeviceService.addSysDevice(sysDevice);
        return R.setOk(sysDevice);
    }
}
